package com.jackstraw.jack_base.rules.entity.po;

import com.jackstraw.jack_base.datasource.mybatis.base.entity.po.PoExample;
import com.jackstraw.jack_base.util.JsonUtil;
import com.jackstraw.jack_base.util.ObjectUtil;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigDecimal;
import java.util.Date;


/**
 * 场景规则组关系表	实体层PoExample
 *
 * @author zhaozhao 945514650@qq.com
 * @since version:1.0 generatorDate:2022-12-04 14:28:29
 */
public class RelationSargPoExample extends PoExample<RelationSargPoExample.Criteria, RelationSargPo> {

	public RelationSargPoExample() {
		super();
	}

	@Override
	public void addKey(Map<String, Object> params) {
		RelationSargPo po = JsonUtil.mapToBean(params, this.poClass);
		if (ObjectUtil.ObjectUtilByLang3.isNotEmpty(po)) {
			if (ObjectUtil.ObjectUtilByLang3.isNotEmpty(po.getSrgRelationId())) {
				this.createCriteria().andSrgRelationIdEqualTo(po.getSrgRelationId());
			}
 		}
	}

	@Override
	protected Criteria createCriteriaInternal() {
		return new Criteria();
	}


	protected abstract static class GeneratedCriteria {
		protected List<Criterion> criteria;

		protected GeneratedCriteria() {
			super();
			criteria = new ArrayList<Criterion>();
		}

		public boolean isValid() {
			return criteria.size() > 0;
		}

		public List<Criterion> getAllCriteria() {
			return criteria;
		}

		public List<Criterion> getCriteria() {
			return criteria;
		}

		protected void addCriterion(String condition) {
			if (condition == null) {
				throw new RuntimeException("Value for condition cannot be null");
			}
			criteria.add(new Criterion(condition));
		}

		protected void addCriterion(String condition, Object value, String property) {
			if (value == null) {
				throw new RuntimeException("Value for " + property + " cannot be null");
			}
			criteria.add(new Criterion(condition, value));
		}

		protected void addCriterion(String condition, Object value1, Object value2, String property) {
			if (value1 == null || value2 == null) {
				throw new RuntimeException("Between values for " + property + " cannot be null");
			}
			criteria.add(new Criterion(condition, value1, value2));
		}

		public Criteria andSrgRelationIdIsNull() {
			addCriterion("srg_relation_id is null");
			return (Criteria) this;
		}

		public Criteria andSrgRelationIdIsNotNull() {
			addCriterion("srg_relation_id is not null");
			return (Criteria) this;
		}

		public Criteria andSrgRelationIdEqualTo(Long value) {
			addCriterion("srg_relation_id =", value, "srgRelationId");
			return (Criteria) this;
		}

		public Criteria andSrgRelationIdNotEqualTo(Long value) {
			addCriterion("srg_relation_id <>", value, "srgRelationId");
			return (Criteria) this;
		}

		public Criteria andSrgRelationIdGreaterThan(Long value) {
			addCriterion("srg_relation_id >", value, "srgRelationId");
			return (Criteria) this;
		}

		public Criteria andSrgRelationIdGreaterThanOrEqualTo(Long value) {
			addCriterion("srg_relation_id >=", value, "srgRelationId");
			return (Criteria) this;
		}

		public Criteria andSrgRelationIdLessThan(Long value) {
			addCriterion("srg_relation_id <", value, "srgRelationId");
			return (Criteria) this;
		}

		public Criteria andSrgRelationIdLessThanOrEqualTo(Long value) {
			addCriterion("srg_relation_id <=", value, "srgRelationId");
			return (Criteria) this;
		}

		public Criteria andSrgRelationIdIn(List<Long> values) {
			addCriterion("srg_relation_id in", values, "srgRelationId");
			return (Criteria) this;
		}

		public Criteria andSrgRelationIdNotIn(List<Long> values) {
			addCriterion("srg_relation_id not in", values, "srgRelationId");
			return (Criteria) this;
		}

		public Criteria andSrgRelationIdBetween(Long value1, Long value2) {
			addCriterion("srg_relation_id between", value1, value2, "srgRelationId");
			return (Criteria) this;
		}

		public Criteria andSrgRelationIdNotBetween(Long value1, Long value2) {
			addCriterion("srg_relation_id not between", value1, value2, "srgRelationId");
			return (Criteria) this;
		}


		public Criteria andSceneActuatorIdIsNull() {
			addCriterion("scene_actuator_id is null");
			return (Criteria) this;
		}

		public Criteria andSceneActuatorIdIsNotNull() {
			addCriterion("scene_actuator_id is not null");
			return (Criteria) this;
		}

		public Criteria andSceneActuatorIdEqualTo(Long value) {
			addCriterion("scene_actuator_id =", value, "sceneActuatorId");
			return (Criteria) this;
		}

		public Criteria andSceneActuatorIdNotEqualTo(Long value) {
			addCriterion("scene_actuator_id <>", value, "sceneActuatorId");
			return (Criteria) this;
		}

		public Criteria andSceneActuatorIdGreaterThan(Long value) {
			addCriterion("scene_actuator_id >", value, "sceneActuatorId");
			return (Criteria) this;
		}

		public Criteria andSceneActuatorIdGreaterThanOrEqualTo(Long value) {
			addCriterion("scene_actuator_id >=", value, "sceneActuatorId");
			return (Criteria) this;
		}

		public Criteria andSceneActuatorIdLessThan(Long value) {
			addCriterion("scene_actuator_id <", value, "sceneActuatorId");
			return (Criteria) this;
		}

		public Criteria andSceneActuatorIdLessThanOrEqualTo(Long value) {
			addCriterion("scene_actuator_id <=", value, "sceneActuatorId");
			return (Criteria) this;
		}

		public Criteria andSceneActuatorIdIn(List<Long> values) {
			addCriterion("scene_actuator_id in", values, "sceneActuatorId");
			return (Criteria) this;
		}

		public Criteria andSceneActuatorIdNotIn(List<Long> values) {
			addCriterion("scene_actuator_id not in", values, "sceneActuatorId");
			return (Criteria) this;
		}

		public Criteria andSceneActuatorIdBetween(Long value1, Long value2) {
			addCriterion("scene_actuator_id between", value1, value2, "sceneActuatorId");
			return (Criteria) this;
		}

		public Criteria andSceneActuatorIdNotBetween(Long value1, Long value2) {
			addCriterion("scene_actuator_id not between", value1, value2, "sceneActuatorId");
			return (Criteria) this;
		}


		public Criteria andRuleGroupIdIsNull() {
			addCriterion("rule_group_id is null");
			return (Criteria) this;
		}

		public Criteria andRuleGroupIdIsNotNull() {
			addCriterion("rule_group_id is not null");
			return (Criteria) this;
		}

		public Criteria andRuleGroupIdEqualTo(Long value) {
			addCriterion("rule_group_id =", value, "ruleGroupId");
			return (Criteria) this;
		}

		public Criteria andRuleGroupIdNotEqualTo(Long value) {
			addCriterion("rule_group_id <>", value, "ruleGroupId");
			return (Criteria) this;
		}

		public Criteria andRuleGroupIdGreaterThan(Long value) {
			addCriterion("rule_group_id >", value, "ruleGroupId");
			return (Criteria) this;
		}

		public Criteria andRuleGroupIdGreaterThanOrEqualTo(Long value) {
			addCriterion("rule_group_id >=", value, "ruleGroupId");
			return (Criteria) this;
		}

		public Criteria andRuleGroupIdLessThan(Long value) {
			addCriterion("rule_group_id <", value, "ruleGroupId");
			return (Criteria) this;
		}

		public Criteria andRuleGroupIdLessThanOrEqualTo(Long value) {
			addCriterion("rule_group_id <=", value, "ruleGroupId");
			return (Criteria) this;
		}

		public Criteria andRuleGroupIdIn(List<Long> values) {
			addCriterion("rule_group_id in", values, "ruleGroupId");
			return (Criteria) this;
		}

		public Criteria andRuleGroupIdNotIn(List<Long> values) {
			addCriterion("rule_group_id not in", values, "ruleGroupId");
			return (Criteria) this;
		}

		public Criteria andRuleGroupIdBetween(Long value1, Long value2) {
			addCriterion("rule_group_id between", value1, value2, "ruleGroupId");
			return (Criteria) this;
		}

		public Criteria andRuleGroupIdNotBetween(Long value1, Long value2) {
			addCriterion("rule_group_id not between", value1, value2, "ruleGroupId");
			return (Criteria) this;
		}


		public Criteria andSortIsNull() {
			addCriterion("sort is null");
			return (Criteria) this;
		}

		public Criteria andSortIsNotNull() {
			addCriterion("sort is not null");
			return (Criteria) this;
		}

		public Criteria andSortEqualTo(BigDecimal value) {
			addCriterion("sort =", value, "sort");
			return (Criteria) this;
		}

		public Criteria andSortNotEqualTo(BigDecimal value) {
			addCriterion("sort <>", value, "sort");
			return (Criteria) this;
		}

		public Criteria andSortGreaterThan(BigDecimal value) {
			addCriterion("sort >", value, "sort");
			return (Criteria) this;
		}

		public Criteria andSortGreaterThanOrEqualTo(BigDecimal value) {
			addCriterion("sort >=", value, "sort");
			return (Criteria) this;
		}

		public Criteria andSortLessThan(BigDecimal value) {
			addCriterion("sort <", value, "sort");
			return (Criteria) this;
		}

		public Criteria andSortLessThanOrEqualTo(BigDecimal value) {
			addCriterion("sort <=", value, "sort");
			return (Criteria) this;
		}

		public Criteria andSortIn(List<BigDecimal> values) {
			addCriterion("sort in", values, "sort");
			return (Criteria) this;
		}

		public Criteria andSortNotIn(List<BigDecimal> values) {
			addCriterion("sort not in", values, "sort");
			return (Criteria) this;
		}

		public Criteria andSortBetween(BigDecimal value1, BigDecimal value2) {
			addCriterion("sort between", value1, value2, "sort");
			return (Criteria) this;
		}

		public Criteria andSortNotBetween(BigDecimal value1, BigDecimal value2) {
			addCriterion("sort not between", value1, value2, "sort");
			return (Criteria) this;
		}


		public Criteria andCreateTimeIsNull() {
			addCriterion("create_time is null");
			return (Criteria) this;
		}

		public Criteria andCreateTimeIsNotNull() {
			addCriterion("create_time is not null");
			return (Criteria) this;
		}

		public Criteria andCreateTimeEqualTo(Date value) {
			addCriterion("create_time =", value, "createTime");
			return (Criteria) this;
		}

		public Criteria andCreateTimeNotEqualTo(Date value) {
			addCriterion("create_time <>", value, "createTime");
			return (Criteria) this;
		}

		public Criteria andCreateTimeGreaterThan(Date value) {
			addCriterion("create_time >", value, "createTime");
			return (Criteria) this;
		}

		public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
			addCriterion("create_time >=", value, "createTime");
			return (Criteria) this;
		}

		public Criteria andCreateTimeLessThan(Date value) {
			addCriterion("create_time <", value, "createTime");
			return (Criteria) this;
		}

		public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
			addCriterion("create_time <=", value, "createTime");
			return (Criteria) this;
		}

		public Criteria andCreateTimeIn(List<Date> values) {
			addCriterion("create_time in", values, "createTime");
			return (Criteria) this;
		}

		public Criteria andCreateTimeNotIn(List<Date> values) {
			addCriterion("create_time not in", values, "createTime");
			return (Criteria) this;
		}

		public Criteria andCreateTimeBetween(Date value1, Date value2) {
			addCriterion("create_time between", value1, value2, "createTime");
			return (Criteria) this;
		}

		public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
			addCriterion("create_time not between", value1, value2, "createTime");
			return (Criteria) this;
		}


		public Criteria andUpdateTimeIsNull() {
			addCriterion("update_time is null");
			return (Criteria) this;
		}

		public Criteria andUpdateTimeIsNotNull() {
			addCriterion("update_time is not null");
			return (Criteria) this;
		}

		public Criteria andUpdateTimeEqualTo(Date value) {
			addCriterion("update_time =", value, "updateTime");
			return (Criteria) this;
		}

		public Criteria andUpdateTimeNotEqualTo(Date value) {
			addCriterion("update_time <>", value, "updateTime");
			return (Criteria) this;
		}

		public Criteria andUpdateTimeGreaterThan(Date value) {
			addCriterion("update_time >", value, "updateTime");
			return (Criteria) this;
		}

		public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
			addCriterion("update_time >=", value, "updateTime");
			return (Criteria) this;
		}

		public Criteria andUpdateTimeLessThan(Date value) {
			addCriterion("update_time <", value, "updateTime");
			return (Criteria) this;
		}

		public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
			addCriterion("update_time <=", value, "updateTime");
			return (Criteria) this;
		}

		public Criteria andUpdateTimeIn(List<Date> values) {
			addCriterion("update_time in", values, "updateTime");
			return (Criteria) this;
		}

		public Criteria andUpdateTimeNotIn(List<Date> values) {
			addCriterion("update_time not in", values, "updateTime");
			return (Criteria) this;
		}

		public Criteria andUpdateTimeBetween(Date value1, Date value2) {
			addCriterion("update_time between", value1, value2, "updateTime");
			return (Criteria) this;
		}

		public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
			addCriterion("update_time not between", value1, value2, "updateTime");
			return (Criteria) this;
		}

	}

	public static class Criteria extends GeneratedCriteria {

		protected Criteria() {
			super();
		}
	}
}